/**
 * 
 */
package com.jquery.ui.tags.beans.script;

import java.util.Map;

import com.jquery.ui.core.bean.UIBean;
import com.jquery.ui.uitls.StringUtils;

/**
 * @author linyajun
 * 
 * @date	2013-9-23
 * @description   
 */
public class DatepickerScriptUI extends UIBean {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3085160991454158763L;

	private String dateFormat="yy-mm-dd";
	private String minDate;
	private String maxDate;
	private Boolean showButtonPanel=false;
	private Boolean changeMonth=false;
	private Boolean changeYear=false;
	private Boolean showOtherMonths=false;
	private Boolean selectOtherMonths=false;
	private Integer numberOfMonths=1;
	private String buttonImage;
	private String onClose;
	private String beforeShow;
	private String onSelect;
	@Override
	public void putAttribute(Map<String, Object> attribute) {
		if (StringUtils.isNotEmpty(dateFormat)) {
			attribute.put("dateFormat", dateFormat);
		}
		if (StringUtils.isNotEmpty(minDate)) {
			attribute.put("minDate", minDate);
		}
		if (StringUtils.isNotEmpty(maxDate)) {
			attribute.put("maxDate", maxDate);
		}
		attribute.put("showButtonPanel", showButtonPanel);
		attribute.put("changeMonth", changeMonth);
		attribute.put("changeYear", changeYear);
		attribute.put("showOtherMonths", showOtherMonths);
		attribute.put("selectOtherMonths", selectOtherMonths);
		attribute.put("numberOfMonths", numberOfMonths);
		if (StringUtils.isNotEmpty(buttonImage)) {
			attribute.put("buttonImage", buttonImage);
		}
		if (StringUtils.isNotEmpty(onClose)) {
			attribute.put("onClose", onClose);
		}
		if (StringUtils.isNotEmpty(beforeShow)) {
			attribute.put("beforeShow", beforeShow);
		}
		if (StringUtils.isNotEmpty(onSelect)) {
			attribute.put("onSelect", onSelect);
		}
		
		

	}
	/**
	 * @return the dateFormat
	 */
	public String getDateFormat() {
		return dateFormat;
	}
	/**
	 * @param dateFormat the dateFormat to set
	 */
	public void setDateFormat(String dateFormat) {
		this.dateFormat = dateFormat;
	}
	/**
	 * @return the minDate
	 */
	public String getMinDate() {
		return minDate;
	}
	/**
	 * @param minDate the minDate to set
	 */
	public void setMinDate(String minDate) {
		this.minDate = minDate;
	}
	/**
	 * @return the maxDate
	 */
	public String getMaxDate() {
		return maxDate;
	}
	/**
	 * @param maxDate the maxDate to set
	 */
	public void setMaxDate(String maxDate) {
		this.maxDate = maxDate;
	}
	/**
	 * @return the showButtonPanel
	 */
	public Boolean getShowButtonPanel() {
		return showButtonPanel;
	}
	/**
	 * @param showButtonPanel the showButtonPanel to set
	 */
	public void setShowButtonPanel(Boolean showButtonPanel) {
		this.showButtonPanel = showButtonPanel;
	}
	/**
	 * @return the changeMonth
	 */
	public Boolean getChangeMonth() {
		return changeMonth;
	}
	/**
	 * @param changeMonth the changeMonth to set
	 */
	public void setChangeMonth(Boolean changeMonth) {
		this.changeMonth = changeMonth;
	}
	/**
	 * @return the changeYear
	 */
	public Boolean getChangeYear() {
		return changeYear;
	}
	/**
	 * @param changeYear the changeYear to set
	 */
	public void setChangeYear(Boolean changeYear) {
		this.changeYear = changeYear;
	}
	/**
	 * @return the showOtherMonths
	 */
	public Boolean getShowOtherMonths() {
		return showOtherMonths;
	}
	/**
	 * @param showOtherMonths the showOtherMonths to set
	 */
	public void setShowOtherMonths(Boolean showOtherMonths) {
		this.showOtherMonths = showOtherMonths;
	}
	/**
	 * @return the selectOtherMonths
	 */
	public Boolean getSelectOtherMonths() {
		return selectOtherMonths;
	}
	/**
	 * @param selectOtherMonths the selectOtherMonths to set
	 */
	public void setSelectOtherMonths(Boolean selectOtherMonths) {
		this.selectOtherMonths = selectOtherMonths;
	}
	/**
	 * @return the numberOfMonths
	 */
	public Integer getNumberOfMonths() {
		return numberOfMonths;
	}
	/**
	 * @param numberOfMonths the numberOfMonths to set
	 */
	public void setNumberOfMonths(Integer numberOfMonths) {
		this.numberOfMonths = numberOfMonths;
	}
	/**
	 * @return the buttonImage
	 */
	public String getButtonImage() {
		return buttonImage;
	}
	/**
	 * @param buttonImage the buttonImage to set
	 */
	public void setButtonImage(String buttonImage) {
		this.buttonImage = buttonImage;
	}
	/**
	 * @return the onClose
	 */
	public String getOnClose() {
		return onClose;
	}
	/**
	 * @param onClose the onClose to set
	 */
	public void setOnClose(String onClose) {
		this.onClose = onClose;
	}
	/**
	 * @return the beforeShow
	 */
	public String getBeforeShow() {
		return beforeShow;
	}
	/**
	 * @param beforeShow the beforeShow to set
	 */
	public void setBeforeShow(String beforeShow) {
		this.beforeShow = beforeShow;
	}
	/**
	 * @return the onSelect
	 */
	public String getOnSelect() {
		return onSelect;
	}
	/**
	 * @param onSelect the onSelect to set
	 */
	public void setOnSelect(String onSelect) {
		this.onSelect = onSelect;
	}
	
	

}
